package cn.edu.neu.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.neu.mapper.MuserMapper;
import cn.edu.neu.mapper.UserMapper;
import cn.edu.neu.model.Muser;
import cn.edu.neu.model.User;

@Service
@Transactional
public class UserServiceImpl implements UserService {
	@Resource
	private UserMapper mapper;
	@Resource
	private MuserMapper musermapper;

	@Override
	public User findUser(String name, String password) {
		User user = mapper.findUser(name, password);
		return user;
	}

	@Override
	public int regUser(String name, String password) {
		int user = mapper.regUser(name, password);
		return user;
	}

	@Override
	public Muser findMuser(String name, String password) {
		Muser muser = musermapper.findMuser(name, password);
		return muser;
	}

}
